<template>
	<view>
		<u-tabbar
			:value="value"
			@change="goClick"
			:fixed="true"
			:placeholder="true"
			:safeAreaInsetBottom="true"
			:activeColor="'#7b974d'"
		>
			<u-tabbar-item iconSize="20" text="首页" class="tab" icon="home" ></u-tabbar-item>
			<u-tabbar-item iconSize="20" text="认养"  class="tab" icon="grid-fill" ></u-tabbar-item>
			<u-tabbar-item iconSize="20" text="我的农场"  class="tab" icon="play-circle" ></u-tabbar-item>
			<!-- <u-tabbar-item text="优选" icon="account" ></u-tabbar-item> -->
			<u-tabbar-item iconSize="20" text="我的"  class="tab" icon="account" ></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		props:{
			value:{
				type:Number,
				default:0
			}
		},
		data() {
			return {
			}
		},
		onLoad() {
	
		},
		methods: {
		goClick(e){
			console.log(e)
			this.value6 = e 
			switch(e){
				case 0:
				uni.switchTab({url:'/pages/index/index'})
				break
				case 1:
				uni.switchTab({url:'/pages/adoptionList/adoptionList'})
				break
				case 2:
				uni.switchTab({url:'/pages/farm/farm'})
				break
				case 3:
				uni.switchTab({url:'/pages/PersonalCenter/index'})
			}
	     }
		}
	}
</script>

<style lang="scss">
	.tab{
		/deep/.u-tabbar-item__text{
			font-size: 16px !important;
		}
		/deep/.u-icon__icon{
			font-size: 14px !important;
		}
	}
</style>